program SiedlerAI;

{$mode objfpc}{$H+}
{$APPTYPE GUI}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  SysUtils, Forms,
  Interfaces, // this includes the LCL widgetset
  systemmanager, //musst be first
  main, basicIO, basicGUI, gui_form_basic, gui_form_Tiatai, basicAI,
  io_ImageCapture_Windows, AI_DoNothing, AI_simplestrategy,
  io_imagecapture_basic, statemachine, io_imagecapture_comparator,
  io_imagecapture_const, FileProvider, basicio_data, basicio_map,
  basicio_street, basicio_player, basicio_field, basicio_harbor, basicio_city,
  basicio_output, basicio_resources, basicio_trade, basicio_const,
  gui_form_Tiatai_Field, io_ImageCapture_Windows_output, io_ImageCapture_output,
  io_imagecapture_imgutils, gui_form_Tiatai_main, logger,
  gui_form_tiatai_AISettings, gui_form_tiatai_output, gui_form_tiatai_Resources,
  ai_johnsen, AI_Schagron;

{$R *.res}

var
  DebugPath: String;

begin
  Application.Title:='Siedlerai';
  Randomize;
  {$IFDEF DEBUG}
  //only for debuging
  DebugPath := GlobalSystemManager.FileProvider.ProvideFile('.\', FT_DebugOutput);
  DeleteFile(DebugPath+'heaptrace.log');
  SetHeapTraceOutput(DebugPath+'heaptrace.log');
  {$ENDIF}
  RequireDerivedFormResource := True;
  Application.Initialize;
  Application.CreateForm(TMainForm, MainForm);
  Application.Run;
end.

